package com.itany.exception;

import org.springframework.web.bind.annotation.ControllerAdvice;
import org.springframework.web.bind.annotation.ExceptionHandler;
import org.springframework.web.servlet.ModelAndView;

@ControllerAdvice
public class GlobalException {
    @ExceptionHandler
    public ModelAndView exceptionHandler(Exception e) {
        return new ModelAndView("exception", "msg",
                "服务器内部异常 ：" + e.getMessage());
    }
}
